<?php

class GUI{
    public function title($title){
        if($title != "") echo "<h1 class='title'>$title</h1>";
    }
    
    public function subtitle($title){
        if($title != "") echo "<h2 class='subtitle'>$title</h2>";
    }
    
    public function infotitle($title){
        if($title != "") echo "<h4 class='infotitle'>$title</h4>";
    }
    
    public function paragraph($paragraph){
        if($paragraph != "") echo "<p>$paragraph</p>";
    }
    
    public function info($title){
        if($title != "") echo "<span class='info'>$title</span>";
    }
    
    public function warning($title){
        if($title != "") echo "<span class='alert'>$title</span>";
    }
    
    public function html($item){
        if($item != "") echo "$item";
    }
    
    public function image($image, $class){
        if($image == "") return;
        
        if(strstr($image, 'http:')){
            echo "imagem!";
        }else{
            $this->Html->LoadImage($image, $class);
        }
    }
    
    public function opendiv($id = "", $class=""){
        if($id != ""){
            $id = GetPlainName($id);
            $id = "id='$id'";
        }
        if($class != ''){
            $class = GetPlainName($class);
            $class = "class='$class'";
        }
        
        echo "<div $id $class>";
    }
    
    public function closediv(){
        echo "</div>";
    }
    
    public function clear(){
        echo "<div class='clear'></div>";
    }
}

?>
